package cn.gjxblog.modules.sys.service.impl;

import cn.gjxblog.common.model.PageInfo;
import cn.gjxblog.common.model.PageRequest;
import cn.gjxblog.modules.sys.dao.SysUserRoleDao;
import cn.gjxblog.modules.sys.entity.SysUserRoleEntity;
import cn.gjxblog.modules.sys.service.SysUserRoleService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 用户与角色对应关系服务实现类
 *
 * @author guojiaxun
 * @date 2019-09-17 11:35:04
 */
@Service("sysUserRoleService")
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserRoleEntity> implements SysUserRoleService {
    @Override
    public PageInfo searchList(PageRequest request) {
        QueryWrapper<SysUserRoleEntity> ew = new QueryWrapper<>();

        IPage<SysUserRoleEntity> page = this.page(new Page<>(request.getPageNum(), request.getPageSize()),ew);
        return new PageInfo(page);
    }

}